c# how to exit program

74

c# exit application -

if (System.Windows.Forms.Application.MessageLoop) 
{
    // WinForms app
    System.Windows.Forms.Application.Exit();
}
else
{
    // Console app
    System.Environment.Exit(1);
}

c# how to exit program -

System.Environment.Exit(1);

Comments

Submit
0 Comments